#ifndef SPRITE_H
#define SPRITE_H
#include "engine_api.h"
#include "RenderTypes.h"
#include "Renderer.h"
#include "Entity2D.h"
#include "pg1_timer.h"
#include "Animation.h"

namespace pg1
	{
	class ENGINE_API Sprite:public Entity2D
	{
	public:
		Sprite();
		~Sprite();
	public:
		void setTexture(Texture& rkTexture);
		void setTextureCoords(	float fU1, float fV1,
								float fU2, float fV2,
								float fU3, float fV3,
								float fU4, float fV4
								);
		void draw(Renderer& rkRenderer) const;
	private:
		Texture m_kTexture;
		TextureCoordVertex* m_pakVertex;
	//animation
	public:
		void setAnimation(Animation* pkAnimation);
		void update(Timer& rkTimer);
	
	private:
		Animation* m_pkAnimation;
		unsigned int m_uiPreviousFrame;
	};
}
#endif